ER diagram view definition

Overview

In Next Design, you can view-define an ER diagram that can represent the structure of the model and the relationships between the models in a diagram format. The view definition of ER diagram can express diagrams of various designs by specifying the following notation.

  • Shape: Shape for each entity
  • Connector: Relationship line between entities

There are the following types of shapes:

Shape types

Shape type Description
Title Only Shape A title is added to the shape.
Title and Description The body of the figure title and description is attached.
With Label A title is attached to the outside of the shape.
Container You can have related models as nested shapes.
Compartment You can display multiple fields specified in a shape.
Port Can be placed on the edge of the figure as a contact point of the connector.
Child Shape Allows related models to be nested.

There is only one type of connector. By changing the style of the connector, you can add lines and arrows.

The following describes the method of defining the view of the ER diagram in the following order.

  • Define a shape
  • Define a connector

Define the shape

Add shape

To add a shape to the view definition of a diagram, from the Model Editor, do the following:

Add Shape

Operating procedure

  • Please refer to the following contents for the operation procedure.

Quick Start> Profile Definition> Define Diagram View> Add Shape for Each Entity

Note

  • Of the shape types, [Port] and [Child Shape] cannot be added unless the parent shape is selected. See "Adding Child Shapes" below for more information.

Change shape type and shape

To change the shape and shape of shapes added to the view definition, follow the steps below from the model editor.

Change shape type and shape

Operating procedure

  1. Select the shape you want to change in the view.
  2. To change the shape type, from the ribbon, click Shape> Node> Kind, then click the type from the choices.
  3. To change the shape of a shape, click Shape> Style> Change Shape from the ribbon, then click the shape from the choices.

Using Custom Shapes

Attention

  • Extra labels (such as model name) may remain visible after changing the shape type. In that case, delete unnecessary labels according to "Change Shape Label" below.

Change the default shape style

There are two ways to change the shape style:

  • Change the style of individual models shown in the diagram
  • Change the default style of shapes defined for each entity as a diagram view definition

This section describes the latter procedure. For the former, refer to Modeling Guide> Edit Model> Edit ER Diagram.

To change the default style and size of a shape, follow these steps:

Change default style of shape

Operating procedure

  1. Select the shape you want to change in the view.
  2. Change the default style of the shape using the following UI.
    • Ribbon [Shape]> [Style]> [Quick Style], [Fill], [Line], [Font Color]
    • Inspector Shape Definition tab> Style> Color, Border Thickness, Show metamodel icon
  3. Use one of the following methods to change the default size of the shape.
    • Change the size of the selected shape and click the Shape> Size> Set Default Size from Selected Shape button on the ribbon.
    • Enter the width in the upper row and the height in the lower row of [Shape]> [Size]> [Default Size] on the ribbon.
    • Enter values in Shape Definition tab> Default Size> Width, Height in the Inspector.

Note

  • Changing the default size of a shape does not change the size of the selected shape or existing shapes.
  • The shape added after changing the default size will be the default size.

Change entity icon

To change the entity's icon that appears in the Model Navigator or Toolbox, from the Inspector, do the following:

Change entity icon

Operating procedure

  1. Click View> Pane> Inspector from the ribbon to display the inspector on the right side of the screen.
  2. Select the shape you want to change in the view.
  3. Select Shape Definition from the tabs at the top of the Inspector.
  4. Click Select under Style> Figure to select an icon from the icon list.

Change label of shape

To change the fields that appear in the shape title and body, do the following:

Change shape label

Operating procedure

  1. Select the shape you want to change in the view.
  2. To change the field to display in the shape title or body, select the field to display from the Shape> Text> Title or Body pull-down list on the ribbon.
  3. To change the title of the shape or the text alignment of the body, select [Align Left], [Center], or [Align Right] under [Shape]> [Text]> [Title] or [Body] on the ribbon. Click one of the to switch.

To add or remove shape labels, do the following from the Inspector:

Operating procedure

  1. Click View> Pane> Inspector from the ribbon to display the Inspector on the right side of the screen.
  2. Select the shape you want to change in the view.
  3. From the tab at the top of the Inspector, select Shape Definition.
  4. To add a label, click the + button below the Label list.
  5. In the [New Label] dialog, select [Filelds] and [Layout] and click the [OK] button.
  6. To remove the label, select the relevant line from the [Label] list and click the [-] button below the list.

Delete shape

To remove a shape from the diagram's view definition and return the shape corresponding to the entity to its undefined state:

Delete shape

Operating procedure

  1. In the view, select the shape you want to delete.
  2. From the ribbon, click Shape> Shape> Delete.
  3. All the shapes are removed from the view, but the model remains. If you add shapes again, those models will reappear in the view.

Attention

  • Removing a shape from the view definition in the ER diagram also removes the connector that connects to that shape from the view definition.

Add child shape

To be able to edit the related elements of the model as nested shapes in the ER diagram, do the following from the Model Editor:

Add child shape

Operating procedure

  1. In the view, select a shape that has a nested shape.
  2. Add child shapes using one of the following methods.
    • Click Shape> Shape> Shape from the ribbon, then click Child Shape from the list of shapes.
    • Click Profile> Diagram> Shape from the ribbon, then click Child Shape from the shape list.
  3. In the [New Shape] dialog, select the field holding the model of the related destination from the [Target Field] pull-down list, and click the [OK] button.
  4. You can now drag and drop entities that can be added as related elements from the Tool Box into the shape.

Note

  • If there are multiple types of entities that can be added as related elements, you need to add a child shape for each of those entities.

Add port

To enable the related elements of the model to be placed as ports on the edge of the shape in the ER diagram, do the following from the model editor:

Add Port

Operating procedure

  1. Select the shape you want to have the port on the view.
  2. Add the port using one of the following methods.
    • From the ribbon, click Shape> Shape> Shape, and from the list of shapes, click Port.
    • Click Profile> Diagram> Shape from the ribbon and then click Port from the list of shapes.
  3. In the New Port dialog, select the field that holds the model of the associated destination from the Target Field pull-down list.
  4. Next, select the location where the port can be located in [Display Location].
  5. Next, select the shape of the port from [Figure] and click the [OK] button.
  6. You can now drag and drop entities that can be added as related elements from the [Tool Box] to the edge of the shape.

Note

  • If you have an input port and an output port, define two relations in the metamodel and then add a port for each of those relations.

Change compartment compartments

If the shape type is Compartment, you can display any field in the pane below the title. To add fields to display in a parcel, do the following:

Change Compartment Compartment

Operating procedure

  1. Select the shape you want to change in the view.
  2. Click Shape> Label> Add Compartment from the ribbon.
  3. In the [New Compartment] dialog, select the field to be added from [Filelds] and click the [OK] button.

To change the order of the fields displayed in a parcel or remove them from the parcel to hide them, follow these steps from the Inspector:

Operating procedure

  1. Click View> Pane> Inspector from the ribbon to display the inspector on the right side of the screen.
  2. In the view, select the shape with compartments you want to change.
  3. From the tab at the top of the Inspector, select Shape Definition.
  4. Select the fields listed in [Compartments], click the [↑] and [↓] buttons below the list to change the order, and use the [-] button to delete them from the partition.

Define the connector

Add connector

If the metamodel already defines lookup relationships between entities, add a connector definition as in the next step.

To add a reference relationship between entities and a connector definition at the same time when the reference relationship between entities is not defined:

Add Connector

Operating procedure

  1. Select the two models on the ER diagram that you want to connect the related lines by holding down the Ctrl key and clicking.
  2. From the ribbon, click Profile> Diagram> Connector, click ▼, and then click Add Reference and Connector.
  3. In the New ConnectorShape dialog, under Relate From and Relate To, check the direction of the relationship.
  4. Next, select [Icon] and set the [Style] item.
  5. Click the [OK] button in the dialog to add the reference relation between the entities and the connector definition to the metamodel, and at the same time, add the relation line on the ER diagram.

Change the default style of the connector

Similar to changing the style of a shape, there are two ways to change the style of the connector:

  • Change the style of individual relationship lines displayed in the ER diagram
  • Change the default style of the connector defined for each relation as the view definition of ER diagram

The latter procedure is described here. For the former, please refer to Modeling Guide> Model Editing> Editing ER Diagram.

To change the default style of the connector:

Change default style of connector

Operating procedure

  1. Select the connector you want to change on the view.
  2. Use the following UI to change the default style of the connector.
    • [Connector]> [Style]> [Relate From], [Relate To], [Line Type], [Quick Style], [Fill], [Line], [Font Color] on the ribbon
    • Inspector [Shape Definition] tab> [Style]> [Relate From], [Relate To], [Line Type], [Color], [Border Thickness], [Line Style], [Show metamodel icon]

Change the label of the connector

To add a label to the connector, follow these steps:

Change connector label

Operating procedure

  1. Select the connector you want to change on the view.
  2. From the ribbon, click Connector> Add Label.
  3. In the New Label dialog, under Filelds, select the field you want to display as a label.
  4. Select the label display position from [Layout] and click the [OK] button.
  5. Edit the connector field values in the Property tab of the Inspector.

To change or remove the label on a connector, do the following from the Inspector:

Operating procedure

  1. Click View> Pane> Inspector from the ribbon to display the inspector on the right side of the screen.
  2. Select the connector you want to change on the view.
  3. Select Shape Definition from the tabs at the top of the Inspector.
  4. To change the label of the connector, point to the appropriate line listed in Label and click the Edit Label button that appears to the far right of the line.
  5. In the [Setting --Label] dialog, change [Filelds] and [Layout] and click the [OK] button.
  6. To delete the connector label, select the corresponding line listed in [Label] and click the [-] button below the list display.

Change connector settings

To change settings such as connector connection orientation, follow these steps from the Inspector.

Operating procedure

  1. Click View> Pane> Inspector from the ribbon to display the Inspector on the right side of the screen.
  2. Select the connector you want to change on the view.
  3. From the tab at the top of the Inspector, select Shape Definition.
  4. Change the setting items in the [Shape] group.

reference

Remove connector

To remove a connector from the diagram's view definition and return the corresponding connector to its undefined state, follow these steps:

Delete Connector

Operating procedure

  1. Select the connector you want to delete on the view.
  2. From the ribbon, click Connector> Shape> Delete.
  3. All the corresponding connectors are deleted from the view, but the relation remains as a model. Add the connectors again and their relationships will reappear in the view.